Method for remotely upgrading the firmware of a target device using wireless technology

ABSTRACT

An embodiment of the present invention provides a system and method for remotely upgrading the firmware of a target device using wireless technology from the Bluetooth-enabled PC or Laptop to another Bluetooth device e.g., mouse, Keyboard, headset, mobile phone etc. Existing solutions either may not have upgrade capabilities, or may require the use of proprietary cables. An embodiment of the solution proposed here extends the “Connecting without cables” concept of Bluetooth to firmware upgrades. The system comprises a host device for sending the firmware required for upgradation; and a target device containing a first code and a second code wherein said first code identifies details of the firmware; and said second code identifies the completion of the download operation when the firmware is successfully downloaded.

PRIORITY CLAIM

This is a continuation-in-part application which claims priority from PCT/IN05/00179, published in English, filed May 31, 2005, which claims priority from Indian patent Application No. 993/Del/2004, filed May 31, 2004, which are incorporated herein by reference.

TECHNICAL FIELD

An embodiment of the invention relates to a method and system for remotely upgrading the firmware of a target device. More particularly, it provides a mechanism to download firmware over the air via Bluetooth short-range wireless technology from the Bluetooth-enabled PC or Laptop to another Bluetooth device, e.g., mouse, keyboard, headset and the like.

BACKGROUND

Bluetooth technology is a cutting-edge open specification that enables short-range wireless connections between electronic devices like desktops, notebook computers, handheld devices, personal digital assistants, mobile phones, camera phones, printers, digital cameras, headsets, mouse and keyboards. Bluetooth wireless technology uses a globally available frequency band (2.4 GHz) for worldwide compatibility. In a nutshell, Bluetooth technology unplugs the digital peripherals and makes cable clutter a thing of the past. With Bluetooth technology integrated in the devices, one can easily connect the computer with other devices wirelessly, within a 30-foot range.

Quite a few wireless (and in fact wired) devices available today do not have any upgrade mechanism. This makes their software obsolete after some time even when the hardware has capabilities to support the new software features. Once the Non Volatile Memory (NVM) on such a device is written, it cannot be rewritten. Thus the bug fixes or patches of the software cannot be passed on the customer after the device has left the production facility.

Some devices do support upgrade mechanism by using UART, USB, Ethernet transport mechanisms or PCMCIA cards. These mechanisms tend to increase the cost of the device. Also, connecting these devices correctly to upgrade them may not be easy for the end users. The cost of connecting the devices may be high, and the process may be tedious

Bluetooth is a convenient and reliable technology that has wireless connectivity at speeds close to 1 Mbps. As a new technology for wireless connectivity, Bluetooth technology cuts the wires that are used to tie up digital devices. Based on a low-cost, short-range radio link, Bluetooth technology can connect many types of digital devices without a single cable in sight, giving more freedom to roam, thereby providing better mobility.

Bluetooth supports connection of several target devices to a single host device.

Bluetooth wireless technology has already become a global de facto standard for wireless connectivity. In the future, Bluetooth technology is likely to be a standard in tens of millions of mobile phones, PCs, laptops, and a whole range of other electronic devices. As a result, the market may demand new innovative applications, value-added services, and end-to-end solutions.

A single transceiver, such as the one offered in Wireless Bluetooth Desktop, can communicate with up to seven compatible Bluetooth devices simultaneously, eliminating multiple device cables. It is industry-supported, standardized wireless protocol that provides compatibility today and most likely in the future. It has a longer range than other wireless technologies: up to 30 feet (9.1 meters) from the transceiver to the Bluetooth device. Also it has application specific protocol designs called Bluetooth profiles with built in security features.

SUMMARY

Nowadays, more and more devices are Bluetooth enabled. This download protocol may prove to be very effective to provide software upgrades and patches to the end users. A few user scenarios of such devices are described below:

-   -   Smart home, in which the speakers are connected to the TV and         the music system wirelessly.     -   Bluetooth enabled digital camera can send still or video images         from any location to any location without the hassle of         connecting the camera to the mobile phone or the wire line         phone.     -   Connection of the PC or notebook to printers, scanners and faxes         without ugly and troublesome cable attachments.     -   The user can increase the freedom by connecting the mouse or the         keyboard wirelessly to the computer.     -   Connect the wireless headset to mobile phone, mobile computer or         any wired connection to keep the hands free for more important         tasks when one is in the office or in the car.     -   In meetings and conferences one can transfer selected documents         instantly with selected participants, and exchange electronic         business cards automatically, without any wired connections.

Therefore it is desired to devise a mechanism to upgrade firmware of wireless devices, including Bluetooth enabled devices, via PC or Laptop in a user-friendly manner.

An embodiment of the invention provides a method and system for remotely upgrading the firmware of a target device, resulting in cost effective and power saving upgradation.

Another embodiment of the invention eliminates the need for a hardware switch/jumper and the like to switch the device to download mode. Rather the mode switch is controlled entirely by the software through the use of vendor specific download commands and DMN.

Yet another embodiment of the invention provides a re-usable and flexible code, which is handled at a very low level, thereby enabling development of new applications.

Another embodiment of the invention provides a robust application ensuring data integrity.

An embodiment of the present invention is a method for remotely upgrading the firmware of a target device using wireless technology comprising the steps of:

-   -   establishing the connection needed for upgrading the target         device;     -   downloading the firmware image to the target device;     -   signaling the completion of the download operation;     -   rebooting the target device; and     -   verifying the successful completion of the download operation.

According to an embodiment, the said establishing the connection needed for upgrading the target device comprises the steps of:

-   -   obtaining a first code of the device firmware in the target         device, which contains the identification details of the         firmware to be downloaded;     -   checking said first code at the host device;     -   sending a download command to the target device;     -   obtaining a response form the target device confirming its         acceptance for the download.

According to an embodiment, the said downloading incorporates validation mechanism including checksums.

According to an embodiment, the said signaling is done by sending a second code to the target device.

According to an embodiment, the said verification is done by checking the presence of a second code in the target device.

According to an embodiment, the normal operation is resumed if verification of the second code is successful.

According to an embodiment, the said download operation is resumed if verification fails.

The said wireless technology includes Bluetooth technology.

An embodiment of the present invention further provides a system for remotely upgrading the firmware of a target device using wireless technology comprising:

-   -   a host device for sending the firmware required for upgradation;         and     -   a target device containing a first code and a second code         wherein         -   i. said first code identifies details of the firmware; and         -   ii. said second code identifies the completion of the             download operation when the firmware is successfully             downloaded.

According to an embodiment, the host device includes a PC or a laptop.

According to an embodiment, the target device includes a Bluetooth enabled device for upgradation of said firmware.

According to an embodiment, the said wireless technology includes Bluetooth technology.

According to an embodiment, the said first code and said second code are Image Magic Number and Download Magic Number respectively.

An embodiment of the invention is a wireless device comprising

-   -   a first code identifying details of the firmware; and     -   a second code identifying the completion of the download         operation when the firmware is successfully downloaded.

BRIEF DESCRIPTION OF THE DRAWINGS

One or more embodiments of the invention will now be explained in reference with the accompanying drawings:

FIG. 1 represents the block diagram of the system in accordance with an embodiment of the invention.

FIG. 2 represents an embodiment of the test setup.

FIG. 3 represents the organization of the NVM in Target Device in accordance with an embodiment of the invention.

FIG. 4 represents the flowchart of the Target Device functionality in accordance with an embodiment of the invention.

FIG. 5 represents the message sequence chart of the Download Protocol in accordance with an embodiment of the invention.

DETAILED DESCRIPTION

FIG. 1 represents a block diagram of the system in accordance with an embodiment of the invention. It contains a host device (2) connected to the target devices 1[1:N]. The connecting channel between the devices is wireless (Bluetooth link) over which the data is communicated.

FIG. 2 represents a concept used to upgrade the firmware of the target devices wirelessly according to an embodiment of the invention. It comprises a host device, which contains the firmware to be downloaded and one or more target devices, which are to be upgraded with the firmware. The host device can be a PC or a Laptop while the target devices can be any wireless device including Bluetooth enabled devices such as a keyboard, mouse, headsets and the like. The firmware is transmitted wirelessly via the air, which acts as a link or channel between two devices.

The target device can be in either of the following two modes: namely the download mode or the normal mode. In the download mode, the required firmware is downloaded to the target device, while in the normal mode, the device firmware executes the normal functionality of the device.

FIG. 3 represents the organization of the NVM 30 in a target device in accordance with an embodiment of the invention. At the manufacturing time, the downloader code as well as the device firmware 31 along with the Download Magic Number (DMN 32) is written in the NVM 30 of the target device. The downloader code is stored in the beginning of the NVM 30. For example, if the sector size in a typical NVM 30 is 64K, the downloader (which could be something like 180K) code will occupy 3 sectors. After reset the target device checks for the DMN 32, and if the DMN 32 is correct, it transfers the control to the device firmware 31.

The device firmware 31 contains a DMN 32 and an Image Magic Number (IMN) 33. It is the actual software on which the device runs, for e.g., for a keyboard, the software will scan the key matrix and report the scan codes.

The DMN 32 refers to the magic number that is written on the NVM 30 to indicate that the device firmware 31 present in the NVM is valid. Absence of this magic number 32 means that the device firmware 31 needs to be upgraded.

The IMN 33 contains the identification details of the firmware to be downloaded and is used to indicate whether the file to be downloaded has been built for the device that is being upgraded. It helps to prevent unexpected scenarios, for instance, where an end user may attempt to download onto the keyboard or on the mobile phone firmware meant for the mouse.

FIG. 4 is a flowchart of the target device functionality according to an embodiment of the invention. At boot up, the downloader code of the target device checks for the presence of DMN 32, which is written at the time of manufacturing. If the DMN 32 is present, which means there is a valid device firmware 31 present in the NVM 30, the target device continues to work in the normal mode 43; but if the DMN 40 does not exist, the target device enters the download mode 42. The DMN 32 is absent basically when the device firmware is absent from the NVM of the target device.

The host device establishes connection with the target device to initialize downloading and sends the vendor specific download command. The vendor specific download commands are very specific to each manufacturer or vendor. The manufacturers define and use their own commands, apart from the standard commands that the device specification defines. Hence a vendor specific download command is used to inform the target device about the firmware upgrade.

The target device responds to the command. Once the host device gets the correct response to the download command from the target device, the host device starts sending the firmware file over the link to the target device. The target device receives the data 44 and writes it at an appropriate location 46 in its NVM 30 designated for the device firmware 31.

After the file transfer is finished 47, a checksum (e.g., 32 bits) calculated by the target device is verified to ensure complete data has been transferred. If the checksum is correct, the host device sends the DMN 32 to the target device, which writes the DMN 32 in the predefined location in the NVM 30; if the checksum is incorrect, the host device restarts with the download process.

Once the download operation is complete, the target device resets itself 49. After resetting, the target device checks for the presence of the DMN. If the DMN is present in the NVM, the target device enters the normal mode and starts working afresh.

FIG. 5 is a message sequence chart of the download protocol between the host device and the target device according to an embodiment of the invention. When the host device wishes to upgrade target devices, it checks for the same in its vicinity. Having determined the target devices situated close to it, the host device establishes a connection with a specific target device. Then it sends a vendor specific download command to the target device.

The target device in turn inquires of the device firmware whether the firmware upgrade is acceptable or not. If the target device approves the download operation, it first erases the DMN 32 contained in the NVM 30 and then switches to the download mode. In case upgradation is not required or otherwise desired, the target device ignores the host device request.

On receipt of correct response to the download command from the target device, which authenticates the target device, the host device sends the device firmware file 31 to the target device over the link. Every firmware contains an IMN 33, in a pre-defined location. The host device, before sending the firmware over the wireless link, checks for the presence of the IMN containing details of the firmware to be downloaded. This is done to ensure that the target device is not upgraded with incorrect firmware. Once the target device receives the device firmware 31 in the download mode, it writes it into the NVM 30.

After the entire firmware file 31 is sent to the target device, the host device asks for the checksum (e.g., 32 bits) from the target device, the checksum being calculated by the target device from the device firmware file. The target device sends the checksum, which is compared with the checksum in the host device to verify whether complete data has been transmitted or not. If the checksum is correct, the host device sends the DMN 32, which is the last transmitted data by the host device. The target device writes the DMN into the NVM and resets itself.

After resetting, if the target device finds the valid DMN it resumes normal mode functioning; else it switches back to the download mode. The host device retransfers the required firmware.

The above-mentioned application ensures that only the intended target device is upgraded and not any other device in the vicinity, using a unique feature “download vendor specific command”. Before any operation is done with the target device, the host device sends this vendor specific download command. If the target device is capable of responding to this vendor specific request, it responds to the command, else it will reject the request and the download operation will be aborted.

An embodiment of the invention can be worked out using the existing technology of Bluetooth protocol. The wireless nature of Bluetooth makes it easy to use for end users and facilitates device upgrade in-situ by the end user. There is no complexity/other technology involved, except for the vendor specific download command and the magic number. When Bluetooth protocol or other wireless protocols are used, no physical connections between the devices are made and the cost does not increase significantly. Thus the low cost protocol is easily used to upgrade such devices without the need of making complex interconnections.

The protocol is robust enough to ensure that if, for some reason, the download does not complete properly, the next time when the device powers up, it goes back to the download mode thereby providing guaranteed upgradation.

From the foregoing it will be appreciated that, although specific embodiments of the invention have been described herein for purposes of illustration, various modifications may be made without deviating from the spirit and scope of the invention. 

1. A method for remotely upgrading the firmware of a target device using wireless technology comprising the steps of: establishing the connection needed for upgrading the target device; downloading the firmware image to the target device; signaling the completion of the download operation; rebooting the target device; and verifying the successful completion of the download operation.
 2. The method for remotely upgrading the firmware of a target device as claimed in claim 1 wherein said establishing the connection needed for upgrading the target device comprises the steps of: obtaining a first code of the device firmware in the target device, which contains the identification details of the firmware to be downloaded; checking said first code at the host device; sending a download command to the target device; obtaining a response form the target device confirming its acceptance for the download.
 3. The method for remotely upgrading the firmware of a target device as claimed in claim 1 wherein said downloading incorporates validation mechanism including checksums.
 4. The method for remotely upgrading the firmware of a target device as claimed in claim 1 wherein said signaling is done by sending a second code to the target device.
 5. The method for remotely upgrading the firmware of a target device as claimed in claim 1 wherein said verification is done by checking the presence of a second code in the target device.
 6. The method for remotely upgrading the firmware of a target device as claimed in claim 5 wherein normal operation is resumed if verification of the second code is successful.
 7. The method for remotely upgrading the firmware of a target device as claimed in claim 1 wherein said download operation is resumed if verification fails.
 8. The method for remotely upgrading the firmware of a target device as claimed in claim 1 wherein said wireless technology includes Bluetooth technology.
 9. The method for remotely upgrading the firmware of a target device as claimed in claim 1 wherein said first code and a second code are Image Magic Number and Download Magic Number respectively.
 10. A system for remotely upgrading the firmware of a target device using wireless technology comprising: a host device for sending the firmware required for upgradation; and a target device containing a first code and a second code wherein i. said first code identifies details of the firmware; and ii. said second code identifies the completion of the download operation when the firmware is successfully downloaded.
 11. The system as claimed in claim 10 wherein the host device includes a PC or a laptop.
 12. The system as claimed in claim 10 wherein the target device includes a Bluetooth enabled device for upgradation of said firmware.
 13. The system as claimed in claim 10 wherein said wireless technology includes Bluetooth technology.
 14. The system as claimed in claim 10 wherein said first code and said second code are Image Magic Number and Download Magic Number respectively.
 15. A wireless device comprising a first code identifying details of the firmware; and a second code identifying the completion of the download operation when the firmware is successfully downloaded.
 16. A device, comprising: a receiver operable to download first device-configuration firmware from a remote device via a wireless channel; and a memory coupled to the receiver and operable to store the first firmware.
 17. The device of claim 16 wherein the receiver is operable to download the firmware according to a Bluetooth protocol.
 18. The device of claim 16, further comprising: a transmitter; and a processor coupled to the memory and to the transmitter and operable to determine whether the stored firmware includes an error, if the firmware includes an error, then cause the transmitter to send to the remote device via the wireless channel a re-download request, cause the receiver to re-download the firmware via the wireless channel, and store the re-downloaded firmware in the memory; and if the firmware does not include an error, then cause the transmitter to inform the remote device via the wireless channel that the receiver has successfully downloaded the firmware.
 19. The device of claim 16, further comprising: a transmitter; and a processor coupled to the memory and to the transmitter and operable to determine whether the stored firmware includes an error, if the firmware includes an error, then cause the transmitter to send to the remote device via the wireless channel a re-download request, cause the receiver to re-download the firmware via the wireless channel, and store the re-downloaded firmware in the memory; and if the firmware does not include an error, cause the transmitter to inform the remote device via the wireless channel that the receiver has successfully downloaded the firmware, receive from the remote device via the wireless channel and the receiver a firmware-valid value that indicates the stored firmware is valid, and store the received value in the memory.
 20. The device of claim 16, further comprising: a transmitter; wherein the memory is operable to store second firmware before receiving the first firmware; and a processor coupled to the memory and to the transmitter and operable to determine whether the stored second firmware is valid, and if the second firmware is not valid, then cause the receiver to download the first firmware.
 21. The device of claim 16, further comprising: a transmitter; wherein the memory is operable to store second firmware before receiving the first firmware and to store a second-firmware-valid value that indicates the validity of the second firmware; and a processor coupled to the memory and to the transmitter and operable to receive a firmware-download command from the remote device, in response to the command, delete the value and cause the receiver to download the first firmware, if the downloaded first firmware includes no errors, then cause the transmitter to inform the remote device via the wireless channel that the receiver successfully downloaded the first firmware, cause the receiver to download from the remote device via the wireless channel a first-firmware-valid value that indicates the validity of the first firmware, and store the first-firmware-valid value.
 22. A device, comprising: a receiver operable to receive from a remote device via a wireless channel a request to upload firmware; and a transmitter operable to upload the firmware to the remote device via the wireless channel in response to the request.
 23. The device of claim 22 wherein the receiver and the transmitter are respectively operable to communicate with the remote device according to a Bluetooth protocol.
 24. The device of claim 22 wherein the transmitter is operable to send a firmware-download command to the remote device before the receiver receives the upload request from the remote device.
 25. The device of claim 22 wherein: the receiver is operable to receive from the remote device via the wireless channel a notification that the remote device received the firmware; and the transmitter is operable to send to the remote device via the wireless channel a firmware-valid value in response to the notification.
 26. The device of claim 22 wherein: the receiver is operable to receive from the remote device via the wireless channel a checksum that indicates that the remote device received the firmware; and the transmitter is operable to send to the remote device via the wireless channel a firmware-valid value in response to the checksum.
 27. The device of claim 22, further comprising a processor coupled to the transmitter and operable to check a firmware identifier, and, if the firmware identifier indicates that the firmware is compatible with the remote device, then enable the transmitter to upload the firmware to the remote device.
 28. An electronic system, comprising: a first device including a first receiver operable to receive from a second device via a wireless channel a request to upload firmware, and a first transmitter operable to upload the firmware to the second device via the wireless channel in response to the request; and the second device including a second receiver operable to download the firmware from the first device via the wireless channel, and a memory coupled to the second receiver and operable to store the downloaded.
 29. The system of claim 28 wherein: the first device comprises a computer; and the second device comprises a computer peripheral.
 30. A method, comprising: downloading first device-configuration firmware via a wireless channel; and storing the first firmware in a memory.
 31. The method of claim 30, further comprising: determining whether the stored firmware includes an error; if the firmware includes an error, then re-downloading the first firmware via the wireless channel and storing the re-downloaded firmware in the memory; and if the firmware does not include an error, then indicating via the wireless channel that the firmware has been downloaded successfully.
 32. The method of claim 30, further comprising: determining whether the stored firmware includes an error; if the firmware includes an error, then re-downloading the first firmware via the wireless channel and storing the re-downloaded firmware in the memory; and if the firmware does not include an error, then indicating via the wireless channel that the firmware has been downloaded successfully, downloading via the wireless channel a firmware-valid value that indicates the stored firmware is valid, and storing the value in the memory.
 33. The method of claim 30, further comprising: determining before downloading the first firmware that no firmware is stored in the memory; and downloading the first firmware comprises downloading the first firmware in response to the determination that no firmware is stored in the memory.
 34. The method of claim 30, further comprising: determining before downloading the first firmware that second firmware stored in the memory is invalid; and downloading the first firmware comprises downloading the first firmware in response to the determination that the second firmware is invalid.
 35. The method of claim 30, comprising: receive a firmware-download command via the wireless channel; in response to the command, deleting a second-firmware-valid value stored in the memory and indicating the validity of second firmware stored in the memory, and downloading the first firmware; indicating via the wireless channel that the first firmware is successfully downloaded; downloading via the wireless channel a first-firmware-valid value that indicates the validity of the first firmware; and storing the first-firmware-valid value in the memory.
 36. A method, comprising: receiving via a wireless channel a request to upload firmware; and uploading the firmware to a remote device via the wireless channel in response to the request.
 37. The method of claim 36, further comprising sending a firmware-download command to the remote device before receiving the upload request.
 38. The method of claim 36, further comprising: receiving via the wireless channel a notification that the remote device received the firmware; and sending to the remote device via the wireless channel a firmware-valid value in response to the notification.
 39. The device of claim 36, further comprising: checking a firmware identifier; and if the firmware identifier indicates that the firmware is compatible with the remote device, then uploading the firmware to the remote device. 